﻿using RpgXna.Model.GameManager;
using RpgXna.Model.Menu.MenuBehaviors;

namespace RpgXna.Model.Interfaces.MainMenu.MenuBehaviors
{
    internal class NewGameBehavior : IMenuBehavior
    {
        private readonly GameStateManager _stateManager;

        public NewGameBehavior(GameStateManager stateManager)
        {
            _stateManager = stateManager;
        }

        #region IMenuBehavior Members

        public void Execute()
        {
            if (_stateManager.State == GameStates.Running) return;

            _stateManager.State = GameStates.Running;
        }

        #endregion IMenuBehavior Members
    }
}